---
export interface Props {
  href: string;
  className?: string;
  ariaLabel?: string;
  title?: string;
  disabled?: boolean;
}

let { href, className, ariaLabel, title, disabled = false } = Astro.props;
href = href.indexOf('http')!==-1?href:import.meta.env.BASE_URL+href
---

<a
  href={disabled ? "#" : href}
  tabindex={disabled ? "-1" : "0"}
  class={`group inline-block ${className}`}
  aria-label={ariaLabel}
  title={title}
  aria-disabled={disabled}
>
  <slot />
</a>

<style>
  a {
    @apply hover:text-skin-accent;
  }
</style>
